﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QQ.AbstractFactory
{
    class SkinFactory
    {
        /// <summary>
        /// 简单工厂模式
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public static ISkin Create(string n)
        {
            if (string.IsNullOrWhiteSpace(n))
            {
                return new WindowsSkin();
            }
            else
            {
                return new MacSkin();
            }
        }
    }
}
